﻿@model SIG.Model.ViewModel.Identity.ChangePasswordVM
@{
    ViewBag.Title = "修改密码";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section leftNav{
    @Html.Partial("_NavForSecurity")
}




<div class="toolbar">
    <a href="#" class="showmenu"><i class="glyphicon glyphicon-menu-hamburger"></i></a>
    <ol class="breadcrumb">
        <li><a href="@Url.Action("Index", "Home")"><i class="glyphicon glyphicon-home"></i> 控制面板</a></li>
        <li>安全</li>
        <li class="active">@ViewBag.Title</li>
    </ol>
</div>
<div class="main-content">

    <div class="panel panel-default">
        <header class="panel-heading">
            <i class="glyphicon glyphicon-lock"></i> @ViewBag.Title
        </header>
        <div class="panel-body">
            @{
                if (ViewBag.StatusMessage != null)
                {

                    <div class="alert alert-success"><span class="glyphicon glyphicon-ok-circle"></span> @ViewBag.StatusMessage.ToString()</div>
                }
            }
            @using (Html.BeginForm("ChangePassword", "User", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
            {
                @Html.AntiForgeryToken()

                @Html.ValidationSummary("", new { @class = "text-danger" })



                <div class="form-group">
                    @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" })
                    <div class="col-md-10">
                        @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" })
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" })
                    <div class="col-md-10">
                        @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" })
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" })
                    <div class="col-md-10">
                        @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" })
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="更改密码" class="btn btn-primary" />
                    </div>
                </div>
            }
        </div>
    </div>
</div>
@section Footer {
    @Scripts.Render("~/bundles/jqueryval")
    <script>
        $(function () {
            $('.mainmenu>li:nth-of-type(4)').addClass('nav-open').find('.submenu li:nth-of-type(3) a').addClass('active');
                   // $('.mainmenu>li:nth-of-type(3)').addClass('nav-open').find('a').addClass('active');
                });
    </script>
}
